<script setup lang="ts">
import { useRouter } from 'vue-router';

import { LOGIN_PATH, REGISTER_PATH } from '@vben/constants';

import { Button, Card, Result } from 'ant-design-vue';

const { replace } = useRouter();
function handleLogin() {
  replace({ path: LOGIN_PATH });
}
function handleReg() {
  replace({ path: REGISTER_PATH });
}
function handleDoc() {
  replace({ path: '/doc/api' });
}
function handleHome() {
  replace({ path: '/home/welcome' });
}
</script>
<template>
  <Card class="h-full">
    <Result
      title="欢迎访问 Secure Net Cloud 开放平台"
      status="404"
      sub-title="想要调用文档？请立即注册"
    >
      <template #extra>
        <Button type="primary" @click="handleHome">已登录，去申请秘钥</Button>
        <Button type="primary" @click="handleLogin">去登录</Button>
        <Button @click="handleReg">去注册</Button>
        <Button @click="handleDoc">看文档</Button>
      </template>
    </Result>
  </Card>
</template>
